package org.jeecg.modules.villageCadreAssist.mapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.villageCadreAssist.entity.VcaResident;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: vca_resident
 * @Author: jeecg-boot
 * @Date:   2022-02-13
 * @Version: V1.0
 */
public interface VcaResidentMapper extends BaseMapper<VcaResident> {

    void createTempTable();

    void addTemp(@Param("residentList") List<VcaResident> residentList);

    void compareAndSetNotLocal(String orgCode);

    void compareAndUpdate(String orgCode);

    void compareAndInsert(String orgCode);

    void clearTempTable(String orgCode);

    IPage<VcaResident> queryPageList(Page<VcaResident> page,@Param(Constants.WRAPPER) QueryWrapper queryWrapper, @Param("orgCode")String orgCode);

    List<VcaResident> queryTopN(@Param("resident")VcaResident resident, @Param("orgCode")String orgCode);

    List<Map<String, String>> queryVillageCadreList(@Param("idcardSet")Set<String> idcardSet, @Param("orgCode")String orgCode);
}
